package com.lgt_enterprise_android.view.dialogs;


import android.view.View;

import com.dialogs.BaseBottomFragmentDialog;
import com.lgt_enterprise_android.R;


public class SexPickerDialog extends BaseBottomFragmentDialog {


    public interface IChangeSucess{
        void changeSex(int gender);
    }

    private IChangeSucess changeSucess;

    public void setPickerDialogCallback(IChangeSucess _changeSucess){
        changeSucess=_changeSucess;
    }

    @Override
    public int getResLayoutId() {
        return R.layout.logout_sex;
    }

    @Override
    public void initData() {

    }

    @Override
    public void initView() {

        findViewById(R.id.txt_male).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                changeSucess.changeSex(1);
                dismiss();
            }
        });

        findViewById(R.id.txt_female).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                changeSucess.changeSex(2);
                dismiss();
            }
        });

        findViewById(R.id.txt_cancel).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                dismiss();
            }
        });
    }
}
